<template>
    <div id="all">
        <Two v-if="have"></Two>
        <One v-else></One>
    </div>
</template>

<script>
import One from '@/components/One.vue'
import Two from '@/components/Two.vue'
export default{
    data:function(){
        return{
            have:false
        }
    },
    components:{
        One,
        Two
    },
    mounted:function(){
        this.$store.dispatch("requestGoodList")
        .then(res=>{
            this.have = res.data.have;
        })
    },
}
</script>

<style scoped>
    #all{
        background-color: white;
    }
</style>